import request from '@/config/axios'
import type { TableData } from './types'

export const getShuliang = (params: any): Promise<IResponse> => {
  return request.get({ url: 'http://localhost:8081/personnel/selAduFeedNum', params })
}

export const getTableListApi = (params: any): Promise<IResponse> => {
  return request.post({ url: 'http://localhost:8081/personnel/selFeedbackList', params })
}

export const saveTableApi = (params: Partial<TableData>): Promise<IResponse> => {
  return request.post({ url: 'http://localhost:8081/personnel/lzrupdFeedback', params })
}

export const saveTwoTableApi = (params: Partial<TableData>): Promise<IResponse> => {
  return request.post({ url: 'http://localhost:8081/personnel/updDeptInfo', params })
}

export const delTableListApi = (ids: string[] | number[]): Promise<IResponse> => {
  return request.post({ url: 'http://localhost:8081/personnel/lzrdelFeedback', data: { ids } })
}

export const getLzrupdDeptStatus = (params: any): Promise<IResponse> => {
  return request.post({ url: 'http://localhost:8081/personnel/lzrupdDeptStatus', params })
}

export const getXiangqin = (params: any): Promise<IResponse> => {
  return request.post({ url: 'http://localhost:8081/personnel/lzrselReceiveInfo', params })
}